this._redisplay();
});
+ // Don't duplicate favorites
+ this._appFavorites = AppFavorites.getAppFavorites();
+ this._appFavoritesChangedId =
+ this._appFavorites.connect('changed', () => this._redisplay());
+
// Drag n' Drop
this._lastOvershoot = -1;
this._lastOvershootTimeoutId = 0;
this._appFilterChangedId = 0;
}
+ if (this._appFavoritesChangedId > 0) {
+ this._appFavorites.disconnect(this._appFavoritesChangedId);
+ this._appFavoritesChangedId = 0;
+ }
+
if (this._swipeTracker) {
this._swipeTracker.destroy();
delete this._swipeTracker;
} catch (e) {
return false;
}
- return this._parentalControlsManager.shouldShowApp(appInfo);
+ return !this._appFavorites.isFavorite(appInfo.get_id()) &&
+ this._parentalControlsManager.shouldShowApp(appInfo);
});
let apps = this._appInfoList.map(app => app.get_id());
if (excludedApps.includes(appId))
return;
+ if (this._appFavorites.isFavorite(appId))
+ return;
+
const app = appSys.lookup_app(appId);
if (!app)
return;